<template>
  <div class="sixbox">
    <div class="index_six">
      <div @click="$router.push('/index/shop')">
        <p>{{ data["出售中商品"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>出售中商品</p>
      <div @click="$router.push('/index/supplier/suppliershops')">
        <p>供应商出售中商品</p>
        <span>{{ data["供应商出售中商品"] }}</span>
      </div>
    </div>
    <div class="index_six">
      <div @click="$router.push('/index/shop')">
        <p>{{ data["仓库中商品"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>仓库中商品</p>
      <div @click="$router.push('/index/supplier/suppliershops')">
        <p>供应商仓库中商品</p>
        <span>{{ data["供应商仓库中商品"] }}</span>
      </div>
    </div>
    <div class="index_six">
      <div @click="$router.push('/index/shop')">
        <p>{{ data["已售罄商品"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>已售罄商品</p>
      <div @click="$router.push('/index/supplier/suppliershops')">
        <p>供应商已售罄商品</p>
        <span>{{ data["供应商已售罄商品"] }}</span>
      </div>
    </div>
    <div class="index_six">
      <div @click="$router.push('/index/order')">
        <p>{{ data["待付款订单"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>待付款订单</p>
      <div @click="$router.push('/index/supplier/supplierorder')">
        <p>供应商待付款订单</p>
        <span>{{ data["供应商待付款订单"] }}</span>
      </div>
    </div>
    <div class="index_six">
      <div @click="$router.push('/index/order')">
        <p>{{ data["待发货订单"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>待发货订单</p>
      <div @click="$router.push('/index/supplier/supplierorder')">
        <p>供应商待发货订单</p>
        <span>{{ data["供应商待发货订单"] }}</span>
      </div>
    </div>
    <div class="index_six">
      <div @click="$router.push('/index/order/returned')">
        <p>{{ data["待退货订单"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>待退货订单</p>
      <div @click="$router.push('/index/supplier/supplierorder')">
        <p>供应商待退货订单</p>
        <span>{{ data["供应商待退货订单"] }}</span>
      </div>
    </div>

    <div class="index_six">
      <div @click="$router.push('/index/shop/query_stock')">
        <p>{{ data["总部库存"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>总部库存</p>
      <div @click="$router.push('/index/shop/query_stock')">
        <p>门店库存</p>
        <span>{{ data["门店库存"] }}</span>
      </div>
    </div>

    <div class="index_six">
      <div @click="$router.push('/index/shop/product_stock?types=1&is_extract=0')">
        <p>{{ data["累计进货金额"] }}</p>
        <i class="el-icon-refresh refresh" @click.stop="refresh"></i>
      </div>
      <p>累计进货金额</p>
      <div @click="$router.push('/index/shop/return_stock')">
        <p>累计退货总金额</p>
        <span>{{ data["累计退货总金额"] }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {};
  },
  props: {
    data: {
      type: Object,
      default: () => ({})
    }
  },
  components: {},
  methods: {
    refresh () {
      this.$bus.$emit("refresh", "check");
    }
  }
};
</script>
<style lang="less" scoped>
.sixbox {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.index_six:last-of-type {
  margin-right: 0;
}

.index_six {
  flex: 1;
  height: 156px;
  margin-right: 15px;
  margin-bottom: 20px;
  padding: 15px;
  display: flex;
  flex-flow: column;
  justify-content: center;
  margin-right: 15px;
  align-items: flex-start;
  background-color: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0px 5px 20px #e4e4e4;
  > div:nth-of-type(1) {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    > p {
      font-size: 24px;
      font-weight: bold;
    }
  }
  > p {
    width: 100%;
    font-size: 14px;
    color: #000;
    line-height: 50px;
    text-align: left;
    border-bottom: 1px solid #e8eaec;
  }
  > div:nth-of-type(2) {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    > p {
      font-size: 14px;
      color: #8c8c8c;
      // font-weight: bold;
    }
    > span {
      font-size: 16px;
      font-weight: bold;
    }
  }
}
.index_six:nth-of-type(1) {
  color: #1890ff;
  border-left: 3px solid #1890ff;
  background: url("./../../../assets/img/index/six1.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(2) {
  color: #b37feb;
  border-left: 3px solid #b37feb;
  background: url("./../../../assets/img/index/six2.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(3) {
  color: #ffd666;
  border-left: 3px solid #ffd666;
  background: url("./../../../assets/img/index/six3.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(4) {
  color: #95de64;
  border-left: 3px solid #95de64;
  background: url("./../../../assets/img/index/six4.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(5) {
  color: #5cdbd3;
  border-left: 3px solid #5cdbd3;
  background: url("./../../../assets/img/index/six5.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(6) {
  color: #ff9c6e;
  border-left: 3px solid #ff9c6e;
  background: url("./../../../assets/img/index/six6.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(7) {
  color: #ff6e81;
  border-left: 3px solid #ff6e81;
  background: url("./../../../assets/img/index/six1.png") no-repeat center;
  background-color: #ffffff;
}
.index_six:nth-of-type(8) {
  color: #6eddff;
  border-left: 3px solid #6eddff;
  background: url("./../../../assets/img/index/six2.png") no-repeat center;
  background-color: #ffffff;
}
</style>
